package com.example.travelcomponentdemo;

import java.util.ArrayList;
import java.util.List;

import com.example.component.horizontallistview.HorizontalImageAdapter;
import com.example.component.horizontallistview.HorizontalView;
import com.example.travelcomponentdemo.R;

import android.os.Bundle;
import android.app.Activity;
import android.graphics.drawable.Drawable;

public class HorizontalListView extends Activity {

	private List<Drawable> drawables;
	private HorizontalImageAdapter imageAdapter;
	private HorizontalView listView;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_horizontal_list_view);

		listView = (HorizontalView) findViewById(R.id.gallery);
		getDrawablesList();
		setupUI();
	}

	private void setupUI() {
		imageAdapter = new HorizontalImageAdapter(this, drawables);
		listView.setAdapter(imageAdapter);

	}

	private void getDrawablesList() {
		drawables = new ArrayList<Drawable>();
		drawables.add(getResources().getDrawable(R.drawable.footer_icon_07_02));
		drawables.add(getResources().getDrawable(R.drawable.footer_icon_08_01));
		drawables.add(getResources().getDrawable(R.drawable.footer_icon_08_02));
		drawables.add(getResources().getDrawable(R.drawable.footer_icon_09_01));
		drawables.add(getResources().getDrawable(R.drawable.footer_icon_09_02));
		drawables.add(getResources().getDrawable(R.drawable.menu_icon_07_01));
		drawables.add(getResources().getDrawable(R.drawable.menu_icon_07_02));
		drawables.add(getResources().getDrawable(R.drawable.menu_icon_08_01));
		drawables.add(getResources().getDrawable(R.drawable.menu_icon_08_02));
		drawables.add(getResources().getDrawable(R.drawable.menu_icon_09_01));
		drawables.add(getResources().getDrawable(R.drawable.menu_icon_09_02));

	}

}
